package cn.darkhorse.mesadmin.controller.code;


import cn.darkhorse.ticket.service.MesCodeRulesService;
import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 业务编码规则 前端控制器
 * </p>
 *
 * @author wangxinghui
 * @since 2024-01-11
 */
@RestController
@RequestMapping("/code-rules")
public class MesCodeRulesController {
	
	@Resource
	private MesCodeRulesService mesCodeRulesService;
	
	/**
	 *统一获取编码
	 * @param key
	 * @return
	 */
	@RequestMapping("/get")
	public AjaxResult getCode(	String key){
		String code = mesCodeRulesService.getCode(key);
		return AjaxResult.success(code);
	}
	
	

}

